<template>
  <div>
    <div>父组件</div>
    <child
      :data1="data1"
      :data2="data2"
      :data3="data3"
      :data4="data4"
      @method1="onMethod1"
      @method2="onMethod2"
    />
  </div>
</template>
<script>
import child from '/src/views/attrs/son1'
export default {
  name: 'Attrs',
  components: {
    child
  },
  data() {
    return {
      data1: '数据1',
      data2: '数据2',
      data3: '数据3',
      data4: '数据4'
    }
  },
  methods: {
    onMethod1(msg1) {
      console.log(`${msg1} running`)
    },
    onMethod2(msg2) {
      console.log(`${msg2} running`)
    }
  }
}
</script>
